using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Hsp.WebNovels.Model.Models
{
    /// <summary>
    /// 章节信息数据实体
    /// </summary>
    [Table("Chapters")]
    [SugarTable("Chapters")]
    public partial class Chapter
    {
        /// <summary>
        /// 章节编号
        /// </summary>
        [Key]
        [SugarColumn(IsPrimaryKey=true)]
        public string? Id { get; set; }

        /// <summary>
        /// 小说编号
        /// </summary>
        [Required(ErrorMessage="{0}不能为空")]
        [DisplayName("小说编号")]
        public string? NovelId { get; set; }

        /// <summary>
        /// 章节地址
        /// </summary>
        [DisplayName("章节地址")]
        public string? ChapterUrl { get; set; }

        /// <summary>
        /// 下一章地址
        /// </summary>
        [DisplayName("下一章地址")]
        public string? NextUrl { get; set; }

        /// <summary>
        /// 源标题
        /// </summary>
        [DisplayName("源标题")]
        public string? SourceTitle { get; set; }

        /// <summary>
        /// 章节标题
        /// </summary>
        [DisplayName("章节标题")]
        public string? ChapterTitle { get; set; }

        /// <summary>
        /// 章节索引
        /// </summary>
        [DisplayName("章节索引")]
        public int? ChapterIdx { get; set; }

        /// <summary>
        /// 章节序号
        /// </summary>
        [DisplayName("章节序号")]
        [StringLength(20)]
        public string? ChapterName { get; set; }

        /// <summary>
        /// 标题文本
        /// </summary>
        [DisplayName("标题文本")]
        public string? HeadWord { get; set; }

        /// <summary>
        /// 章节字数
        /// </summary>
        [DisplayName("章节字数")]
        public int? WordCount { get; set; }

        /// <summary>
        /// 有效章节：0-否；1-是；
        /// </summary>
        [DisplayName("有效章节")]
        public int? ValidChapter { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        [DisplayName("添加时间")]
        [DataType(DataType.DateTime)]
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [DisplayName("更新时间")]
        [DataType(DataType.DateTime)]
        public DateTime? UpdateTime { get; set; }

 
    }
}
